package org.jeecg.common;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

import com.google.common.collect.Lists;

import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.NumberUtil;

public class Test {
	public static void main(String[] args) {
//		Document doc = new Document();
//		doc.loadFromFile("C:/Users/dycon/Desktop/android SDk接口.doc");
//		PictureWatermark pictureWatermark = new PictureWatermark();
//		pictureWatermark.setPicture("D:/qrcode/20201223134245.png");
//		pictureWatermark.setScaling(150);
//		pictureWatermark.isWashout(true);
//		
//		
//		//添加水印图片到文档
//		doc.setWatermark(pictureWatermark);
//
//        //保存结果文件
//		doc.saveToFile("C:\\Users\\dycon\\Desktop\\图片水印.pdf", FileFormat.PDF);
//		String[] a = {"a","b"};
//		List<String> list = Arrays.asList(a);
//		for (String string : list) {
//			System.out.println(string);
//		}
//		FileMakerCtrl fmCtrl = new FileMakerCtrl();
//	    WordDocument doc = new WordDocument();
//	    doc.openDataRegion("PO_company").setValue("北京某某有限公司");//给数据区域赋值，即把数据填充到模板中相应的位置
//	    fmCtrl.setSaveFilePage("/savepdf"); //保存pdf的action或RequestMapping方法
//	    fmCtrl.setWriter(doc);
//	    fmCtrl.fillDocumentAsPDF("doc/template.doc", DocumentOpenType.Word, "123.pdf");//填充word模板并转为pdf
//		加载word示例文档
//        Document document = new Document();
//        document.loadFromFile("C:/Users/dycon/Desktop/21-2信息谷项目商业一期景观管网工程嵌草砖采购合同_青岛好大路建材有限公司_王建华(李吉晓审)20210104.doc", FileFormat.Docx);
//        //保存结果文件
//        document.saveToFile("D:/qrcode/dsdfa.pdf", FileFormat.PDF);
//        document.close();
		
//		String[] col= new String[]{"a","b","c","d","e"};
//		List<String> colList = CollUtil.newArrayList(col);
//		colList.add("12");
//
//		String str = CollUtil.join(colList, "#"); //str -> a#b#c#d#e
//		System.out.println(str);
//		
//		List<String> sdList = CollUtil.newLinkedList("as", "sdf", "eq");
//		String str1 = CollUtil.join(sdList, ",");
//		System.out.println(str1);
//		
//		List<String> list = Lists.newArrayList();
//		System.out.println(CollUtil.isEmpty(list));	
		String aaa = NumberUtil.decimalFormat("0000", 15542);
		System.out.println(aaa);
		
		String forStr = "yyyyMMdd-";
		SimpleDateFormat format = new SimpleDateFormat(forStr);
		System.out.println(format.format(new Date()));
	}
}
